Skip to content

Fix JSON structure, adjust to httr2 - #87

Closed
jwokaty wants to merge 1 commit into
seandavi:develfrom
jwokaty:fix-doi-creation
Closed

jwokaty wants to merge 1 commit into
seandavi:develfrom
jwokaty:fix-doi-creation

Conversation

@jwokaty

@jwokaty jwokaty commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Not sure when the structure changed, but needed to edit the JSON and also rename response to resp to avoid conflict with httr2 function.

@seandavi

Copy link
Copy Markdown
Owner

@copilot we just merged a fix to main that we think might address the CI failures here. Can you look at pulling in the most recent changes to this PR and then checking the CI again?

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The corrected schema and response parsing lack deterministic automated coverage.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Updates DOI creation to match DataCite’s JSON:API structure and httr2 response handling.

Changes:

  • Corrects nested metadata arrays in the request payload.
  • Reads the DOI from data.attributes.doi.
  • Renames the response variable to resp.
File summaries
File Description
R/newBiocPkgDOI.R Updates DataCite request and response structures.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread R/newBiocPkgDOI.R
Comment on lines +68 to +72
identifiers = list(list(
identifier = pkg_doi,
identifierType = "DOI"
),
creators = list(name = paste(authors, collapse = ", ")),
titles = list(title = pkg),
)),
creators = list(list(name = paste(authors, collapse = ", "))),
@seandavi seandavi mentioned this pull request Sep 16, 2026
1 of 2 tasks
@seandavi

Copy link
Copy Markdown
Owner

Diagnosed the CI failures here: all 4 checks were failing due to pre-existing, unrelated flakiness in the activitySince tests (tests/testthat/test_biocDownloadStats.R), which hit the live GitHub API and asserted nrow(res) > 0L — brittle on unauthenticated/rate-limited fork-PR runs. That was already fixed on devel in d110e06 (merged via #88) after this branch was opened, so this branch's CI never picked up the fix.

Recreated this change on top of current devel in #89, which now passes CI cleanly on all 4 platforms. Closing this one in favor of #89 — thanks for the fix, @jwokaty!

@seandavi seandavi closed this Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants